const mongoose = require('mongoose')

const Schema = new mongoose.Schema({
    id: Number,
    title: String,
    createTime: String,
    content: String,
    stemform: String,
    // 阅读
    read: {
        type: Number,
        default: 0
    },
    // 点赞
    star: {
        type: Number,
        default: 0
    },
    // 评论
    comment: {
        type: Number,
        default: 0
    },
    author: String
})

const Article = mongoose.model('article', Schema)

module.exports = {
    Article
}